useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.5.0_11'

	if window('Protocol Buffer Editor'):
		select('FileChooser', commonBits.sampleDir() + 'Ams_LocDownload_20041228.bin')
		#commonBits.setRecordLayout(select, 'ams Store')
		click('Edit1')
		click('Filter')
		select('Table', 'false', 'Include,0')
		select('Table', 'false', 'Include,2')
		select('Table', 'false', 'Include,5')
		select('Table', 'false', 'Include,6')
		select('Table', 'false', 'Include,7')
		#select('Table1', 'cell:Include,7(false)')
		select('Table1', 'Loc_Nbr', 'Field,0')
		select('Table1', '1', 'Value,0')
		select('Table1', 'Loc_Nbr', 'Field,1')
		select('Table1', '2', 'Value,1')
		select('Table1', 'cell:Value,1()')
		click('Filter1')
		select('Table', 'cell:5|Loc_Addr_Ln1,4(Derwent Park)')
		assert_p('Table', 'Text', 'Derwent Park', '5|Loc_Addr_Ln1,4')
		select('Table', 'cell:5|Loc_Addr_Ln1,5(Chermside Shopping Centre, G ie Rd)')
		assert_p('Table', 'Content', '[[5129, Macquarie, Maquarie Centre, NSW, A], [5162, Tuggeranong, Hyperdome Shopping Centre, NSW, A], [5012, Ringwood, Ringwood, VIC, A], [5152, Mornington, Mornington, VIC, A], [5132, Glenorchy, Derwent Park, TAS, A], [5172, Strathpine - Not Yet Open, Chermside Shopping Centre, G ie Rd, QLD, A], [5126, Robina, Robina Town Centre, QLD, A], [5021, Tea Tree Plaza, Myer Tea Tree Plaza, SA, A], [5127, Marion, Adelaide Airport, SA, A], [5142, Hollywood Plaza, Hollywood Plaza Shopping Centre, SA, A], [5128, Rockingham, Rockingham Shopping Centre., WA, A], [5192, Wetherill Park, , , A]]')
		select('Table', 'cell:5|Loc_Addr_Ln1,7(Myer Tea Tree Plaza)')
		assert_p('Table', 'RowCount', '12')
		select('Table', 'cell:4|Loc_Name,2(Ringwood)')
		rightclick('Table', '4|Loc_Name,2')
		select_menu('Edit Record')
	##	select('Table1', 'cell:4|Loc_Name,2(Ringwood)')
		select('Table', 'cell:Data,1(Ringwood)')
		assert_p('Table', 'Content', '[[Loc_Nbr, 2, , 5012, 5012], [Loc_Name, 4, , Ringwood, Ringwood], [Loc_Addr_Ln1, 5, , Ringwood, Ringwood], [Loc_State, 9, , VIC, VIC], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,3(VIC)')
		assert_p('Table', 'Text', 'VIC', 'Data,3')
		select('Table', 'cell:Data,2(Ringwood)')
		assert_p('Table', 'RowCount', '5')
	close()
